#ifndef __NFC_MANAGEMENT_H__
#define __NFC_MANAGEMENT_H__

#include <sys/types.h>
#include <stdint.h>
#include <nfc/nfc.h>
#include "internal.h"

struct mifare_tag;
typedef struct mifare_tag *MifareTag;

MifareTag	*freefare_get_tags (nfc_device *device);
MifareTag	 freefare_tag_new (nfc_device *device, nfc_iso14443a_info nai);
enum mifare_tag_type freefare_get_tag_type (MifareTag tag);
const char	*freefare_get_tag_friendly_name (MifareTag tag);
char		*freefare_get_tag_uid (MifareTag tag);
void		 freefare_free_tag (MifareTag tag);
void		 freefare_free_tags (MifareTag *tags);

// DESFIRE functions
int desfire_send_cmd(MifareTag tag, uint8_t cmd, char *param);
int	mifare_desfire_connect (MifareTag tag, uint8_t *ret, nfc_target *tag_ptr);
int	mifare_desfire_disconnect (MifareTag tag);

// Classic 1K functions
int	mifare_classic_connect (MifareTag tag);
int	mifare_classic_disconnect (MifareTag tag);
//int	mifare_classic_read (MifareTag tag, const MifareClassicBlockNumber block, MifareClassicBlock *data);
//int	mifare_classic_write (MifareTag tag, const MifareClassicBlockNumber block, const MifareClassicBlock data);
//int	mifare_classic_transfer (MifareTag tag, const MifareClassicBlockNumber block);

#endif /* !__NFC_MANAGEMENT_H__ */
